package com.zhoukx.facade;

/**
 * @ClassName HomeTheaterFacade
 * @Description: 外观类
 * @Author zhoukx
 * @Date 2020/8/10
 **/
public class HomeTheaterFacade {

    // 定义子系统的对象
    private  TheaterLight theaterLight;
    private  Popcorn popcorn;
    private  Stereo stereo;
    private  Projector projector;
    private  Screen screen;
    private  DvDplayer dvDplayer;

    public HomeTheaterFacade() {
        this.theaterLight = TheaterLight.getInstance();
        this.popcorn = Popcorn.getInstance();
        this.stereo = Stereo.getInstance();
        this.projector = Projector.getInstance();
        this.screen = Screen.getInstance();
        this.dvDplayer = DvDplayer.getInstance();

    }

    // 操作步骤分成4步
    public void ready(){
        popcorn.on();
        popcorn.pause();
        popcorn.off();
        screen.up();
        projector.on();
        stereo.on();
        dvDplayer.on();
    }
    public  void  play(){
        dvDplayer.play();
    }
    public  void  pause(){
        dvDplayer.pause();
    }
    public void ent(){
        popcorn.off();
        theaterLight.bright();

    }


}
